<template>
  <div id="app">
    <Loginagain :DialogVisible="showLoginagain" ref="Loginagain"></Loginagain>
    <router-view></router-view>
  </div>
</template>
<script>
import common from "./js/Common.js"
export default {
  name: 'app',
  data: () => ({
    showLoginagain: false,
  }),
  methods:{
    onbeforeunload(event){
      console.log("我在这写点东西...");
    },
  },
  watch: {
    "showLoginagain":{
      handler(){
        this.$refs.Loginagain.$data.DialogVisible=this.showLoginagain;
      },
      deep:true
    } 
  },
  mounted() {
    window.onbeforeunload =this.onbeforeunload();
  },
}
</script>

<style>
body{
  margin: 0;
  padding: 0;
  color: #000;
}
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* text-align: center; */
  color: #2c3e50;
}
</style>
